import { request } from "@/request";

export async function addOrUpdate(data) {
  return request("/admin/vip/update", {
    method: "POST",
    data,
  });
}

export async function fetchInfo(data) {
  return request("/admin/vip/getVipInfo", {
    method: "POST",
    data,
  });
}

export async function fetchOpenVipList(data) {
  const res = await request("/admin/vip/pageQueryVipUser", {
    method: "POST",
    data,
  });
  return {
    data: res?.data?.list,
    total: res?.data?.total,
    success: true,
  };
}


export async function freeDeliverySetUpdate(data) {
  return request("/admin/freeDeliverySet/update", {
    method: "POST",
    data,
  });
}

export async function freeDeliverySetSelect(data) {
  return request("/admin/freeDeliverySet/select", {
    method: "POST",
    data,
  });
}